﻿
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            String reqXml = "<Request service=\"OrderService\" lang=\"zh-CN\">\n" +
                            "<Head>SLKJ2019</Head> \n" +
                            "<Body> \n" +
                            "	<Order \n" +
                            "	          orderid=\"QIAO-20180109001\" \n" +
                            "    	          express_type='1' \n" +
                            "                  j_province='广东省'\n" +
                            "                  j_city='深圳市'  \n" +
                            "                  j_company='顺丰镖局'\n" +
                            "                  j_contact='艾丽丝'\n" +
                            "                  j_tel='15012345678'\n" +
                            "                  j_address='福田区新洲十一街万基商务大厦26楼'              \n" +
                            "                  d_province='广东省' \n" +
                            "			       d_city='广州市' \n" +
                            "			       d_county=''\n" +
                            "			       d_company='神罗科技' \n" +
                            "			       d_contact='风一样的旭哥' \n" +
                            "			       d_tel='33992159' \n" +
                            "			       d_address='海珠区宝芝林大厦701室'  \n" +
                            "                  parcel_quantity='1' \n" +
                            "                  pay_method='3'\n" +
                            "                  custid ='7551234567'  \n" +
                            "                  customs_batchs=''\n" +
                            "                   cargo='iphone 7 plus' >\n" +
                            "			    <AddedService name='COD' value='1.01' value1='7551234567'/>                                                                                                                                                           \n" +
                            "         </Order>\n" +
                            "</Body> \n" +
                            "</Request>";
            String reqURL = "https://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService";
            String clientCode = "YeZn5F5C";//此处替换为您在丰桥平台获取的顾客编码
            String checkword = "JEfEf0RB1x3LCUpTfaNu4Qr3sjLjQiV3";//此处替换为您在丰桥平台获取的校验码            
            String myReqXML = reqXml.Replace("SLKJ2019", clientCode);
            Console.WriteLine("请求报文：" + myReqXML);

            //com.sf.csim.express.service.CallExpressServiceTools tools = com.sf.csim.express.service.CallExpressServiceTools.getInstance();
            //String respXml = tools.callSfExpressServiceByCSIM(reqURL, myReqXML, clientCode, checkword);
        }
    }
}
